﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Common.Criteria
{
    /// <summary>
    /// Criteria class that allows a profile GUID and Company GUID to be used as part of the same criteria
    /// </summary>
    [Serializable]
    public class ProfileGUIDAndCompanyGUIDCriteria : CriteriaBase<ProfileGUIDAndCompanyGUIDCriteria>
    {

        #region Constructors

            /// <summary>
            /// Default constructor for this class
            /// </summary>
            /// <param name="profileGUID">The GUID of the profile to asscoiate with this criteria</param>  
            /// <param name="companyGUID">The GUID of the company to asscoiate with this criteria</param> 
            public ProfileGUIDAndCompanyGUIDCriteria(Guid profileGUID, Guid companyGUID)
            {
                ProfileGUID = profileGUID;
                CompanyGUID = companyGUID;
            }

        #endregion

        #region Properties

            /// <summary>
            /// This is the Guid of the profile associated with criteria
            /// </summary>
            public static PropertyInfo<Guid> ProfileGUIDProperty = RegisterProperty<Guid>(p => p.ProfileGUID);
            /// <summary>
            /// This is the Guid of the profile associated with criteria
            /// </summary>
            public Guid ProfileGUID
            {
                get { return ReadProperty(ProfileGUIDProperty); }
                private set { LoadProperty(ProfileGUIDProperty, value); }
            }

            /// <summary>
            /// The GUID of the Company of the profile.
            /// </summary>
            public static PropertyInfo<Guid> CompanyGUIDProperty = RegisterProperty<Guid>(p => p.CompanyGUID);
            /// <summary>
            /// The GUID of the Company of the profile.
            /// </summary>
            public Guid CompanyGUID
            {
                get { return ReadProperty(CompanyGUIDProperty); }
                set { LoadProperty(CompanyGUIDProperty, value); }
            }

        #endregion

    }
}
